﻿using System.Collections.Generic;
using UnityEngine;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Transforms;
using Unity.Collections;
using Unity.Jobs;
using Unity.Burst;

namespace Jinndev.Rendering2D {

    public class TilingOffsetSystem : JobComponentSystem {

        protected override JobHandle OnUpdate(JobHandle inputDeps) {
            inputDeps = Entities.ForEach((Entity entity, ref PropertyTilingOffset tilingOffset, in AtlasTilingOffset atlasTilingOffset) => {

                tilingOffset.Value = atlasTilingOffset.value;

            }).Schedule(inputDeps);
            return inputDeps;
        }


    }

}
